<template>
  <div v-if="icon">
    <svg class="iconpark-icon item_icon" v-if="icon.indexOf('#') > -1">
      <use :href="icon"></use>
    </svg>
    <el-icon v-else>
      <Component class="item_icon" :is="icon"></Component>
    </el-icon>
  </div>
</template>
<script>
export default {
  data() {
    return {
      data: this.value,
    };
  },
  props: {
    icon: {
      type: String,
      default: "",
    },
  },
};
</script>
<style scoped>
.el-icon {
  width: 30px;
  height: 30px;
}
.el-icon svg {
  width: 30px;
  height: 30px;
}
</style>
